#include <boost/filesystem.hpp>
#include <iostream>

int main()
{
	boost::filesystem::path p("C:\\Windows\\win.ini");
	//* file size
	boost::system::error_code ec;
	boost::uintmax_t filesize = boost::filesystem::file_size(p,ec); 
	if(!ec)
		std::cout << filesize << std::endl;
	else
		std::cout << ec << std::endl;

	//* last write time
	try {
		std::time_t t = boost::filesystem::last_write_time(p); 
		std::cout << std::ctime(&t) << std::endl;
	}
	catch (boost::filesystem::filesystem_error &e) {
		std::cerr << e.what() << std::endl;
	}
	//* disk space calculated in bytes.
	try {
		p = "F:\\";
		boost::filesystem::space_info s = boost::filesystem::space(p);
		std::cout << s.capacity << std::endl;
		std::cout << s.free << std::endl;
		std::cout << s.available << std::endl;
	}
	catch (boost::filesystem::filesystem_error &e) {
		std::cerr << e.what() << std::endl;
	}
}